﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OOSE_TDD
{
    public class Article : IEquatable<Article>
    {
        
        // Die folgenden Methoden werden für den Objektvergleich der Tests benötigt.
        public override bool Equals(Object obj)
        {
            if (obj == null) return base.Equals(obj);

            if (!(obj is Article))
                throw new InvalidCastException("The 'obj' argument is not a Article object.");
            else
                return Equals(obj as Article);
        }

        public bool Equals(Article other)
        {
            if (this.articleName == other.articleName
                && (this.description == other.description)
                && (this.grossPrice == other.grossPrice)
                && (this.taxRate == other.taxRate))
                return true;
            else
                return false;
        }
    }
}
